package com.esp.soccertutor.fbreader.fbreader;

import com.esp.soccertutor.zlibrary.core.options.ZLIntegerRangeOption;
import com.esp.soccertutor.zlibrary.text.view.style.ZLTextStyleCollection;

public class ChangeFontAlignment extends FBAction {

	private int index;
	public ChangeFontAlignment(FBReaderApp fbreader,int indexValue) {
		super(fbreader);
		index=indexValue;
		
	}

	@Override
	public void run() {
		
		ZLIntegerRangeOption option =ZLTextStyleCollection.Instance().getBaseStyle().AlignmentOption;
		option.setValue(index);
		Reader.clearTextCaches();
		Reader.getViewWidget().repaint();
	}

}
